/*
 * AGENT SHERPA
 *  
 * Assignement 2 of the Agent Oriented Software Engineering Course
 * M.Sc. in Advanced Software Engineering (Part-time)
 * University College Dublin www.ucd.ie
 *
 * Copyright (c) 2007 Chris Walsh, Aidan Morrisy and Iain Hull.
 * All rights reserved.
 * 
 * Filename: Main.aps
 * Author:   iain
 * Date:     06 February 2008
 */
package org.agentsherpa.model;

/**
 * The Drone class models the information required to place a drone on a map.
 * 
 * @author iain
 */
public class Drone {
    /**
     * The possible status of a drone
     */
    public enum Status {
        Alive, Dead
    }

    /**
     * Construct a Drone.
     * 
     * @param name
     *            The name of the drone.
     * @param location
     *            The initial location of the drone.
     */
    public Drone(String name, Point location) {
        this.name = name;
        this.location = location;
        this.status = Status.Alive;
    }

    /**
     * Get the location of the drone.
     * 
     * @return
     */
    public Point getLocation() {
        return location;
    }

    /**
     * Set the location of the drone (Only model classes can use this method).
     * 
     * @param location
     */
    void setLocation(Point location) {
        this.location = location;
    }

    /**
     * Get the name of the drone
     * 
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * Set the status
     * 
     * @return
     */
    public Status getStatus() {
        return status;
    }

    /**
     * Get the status
     * 
     * @param status
     */
    public void setStatus(Status status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Drone " + name + " " + location + " is " + status;
    }

    /** The name of the drone */
    private String name;

    /** The location of drone on the map */
    private Point location;

    /** The status of the drone */
    private Status status;

}
